import request from '@/utils/request';
import { getCookie } from "@/utils/authority";

export async function queryDomainList(params) {
  return request('/api/getDomainList', {
    params,
    headers: {
      'login-token': getCookie('tks')
    },
  });
}
export async function removeRule(params) {
  return request('/api/delDomain', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    },
    data: { ...params},
  });
}

export async function getDnsList(params) {
  return request('/api/dnsList', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    },
    data: { ...params},
  });
}

export async function sysncu() {
  return request('/api/syncDomain', {
    method: 'POST',
    headers: {
      'login-token': getCookie('tks')
    }
  });
}
